<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>   
    <form action="xxx">
        <p>用户名：<input id="name" type="text" placeholder="请输入用户名" maxlength="5" onblur="panduan()"/></p>  
        <p>密码：<input name="password" type="password"/></p>
        <p>性别：
            <input type="radio" name="sex">男
            <input type="radio" name="sex">女
        </p>
        <p>学历：
            <input type="radio" name="xueli">本科
            <input type="radio" name="xueli">大专
        </p>
        <p>自我介绍：
            <textarea id="introduce" rows="3" cols="50"></textarea>
        </p>
        
    </form>
    <input type="button" onclick="submmit()" value="提交">
    <script>
        function panduan(){ 
            var n = document.getElementById("name").value;
            if (n != "admin"){    
                alert("输入错误！");
            }                 
        }   
        
        function submmit(){
            var introduce = document.getElementById("introduce").value;
            alert(introduce);
        }
    </script>
</body>
</html>